package com.baozhun.mall.common.viewmodel.request

import androidx.lifecycle.MutableLiveData
import com.baozhun.mall.common.model.bean.ClassifyInfo
import com.baozhun.mall.common.network.mCommonApiService
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel
import me.hgj.jetpackmvvm.ext.request
import me.hgj.jetpackmvvm.state.ResultState

/**
 * @Title：
 * @Description：
 * @Author：xing.luo
 * @Since：2023/2/11
 * @Version：1.0.0
 */
class RequestSwipeViewModel: BaseViewModel() {
    var categoryList = MutableLiveData<ResultState<MutableList<ClassifyInfo>>>()


    fun getCategoryList() {
        request({ mCommonApiService.getCategoryList() }, categoryList, true)
    }
}